package com.yunhe.energy.client.fallback;

import com.yunhe.common.model.ResultObject;
import com.yunhe.common.model.device.Analog;
import com.yunhe.energy.client.DeviceClient;
import feign.hystrix.FallbackFactory;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Component;


/**
 * @author hetao
 */
@Component
public class DeviceFallbackFactory implements FallbackFactory<DeviceClient> {
    @Override
    public DeviceClient create(Throwable arg0) {
        return new DeviceClient() {
            @Override
            public ResponseEntity<ResultObject<Analog>> getAnalogsByDevCodeAndTypeCode(Long devCode, String typeCode, String terminal, String meter) {
                return null;
            }

            @Override
            public ResponseEntity<ResultObject<Analog>> getAnalogsByDevIdAndTypeCode(Long devId, String typeCode, String terminal,String meter) {
                return null;
            }
        };
    }
}
